$(function() {
	$('#vue_vm_list div').hide();
	var pageParamStr = $.url().param('pageParam');
	var pageParam = JSON.parse(pageParamStr);
	findElderByBedIdForPrint(pageParam);
});

function findElderByBedIdForPrint(pageParam) {
	if($('#vue_vm_list').length==0) {return;}
	$('#vue_vm_list div').hide();
	
	find_basic_by_json(path+'/elderBeHospital/findDetail', {id: pageParam.beHospitalId}, function(response) {
		$('#vue_vm_list').html(gl_vue_vm_list_html);
		
		for(var i=0; i<response.data.length; i++) {
			response.data[i].pageParam = pageParam;
		}
		
		new Vue({
			el: '#vue_vm_list',
			data: {
				todos: response.data
			},
			methods: {
				getSubsidizationValue:function(subsidization, subsidizationValue) {
					return getSubsidizationValue(subsidization, subsidizationValue);
				},
				getSubsidizationUnit:function(subsidization) {
					return getSubsidizationUnit(subsidization);
				},
				getSubsidizationText:function(subsidization, subsidizationValue) {
					return getSubsidizationText(subsidization, subsidizationValue);
				},
				getConsDeductionText:function(consumptionWay, consDeductionWay) {
					return getConsDeductionText(consumptionWay, consDeductionWay);
				},
				//总共可扣月数
				getTotalMonths:function(todo) {
					return getTotalMonths(todo);
				},
				//剩余可扣月数
				getRemainMonths:function(todo) {
					return getRemainMonths(todo);
				},
				//已扣月数
				getAlreadyUsedMonths:function(todo) {
					return getAlreadyUsedMonths(todo);
				},
				//总共可扣天数
				getTotalNumber:function(todo) {
					return getTotalNumber(todo);
				},
				//剩余可扣天数
				getRemainNumber:function(todo) {
					return getRemainNumber(todo);
				},
				//已扣天数
				getAlreadyUsedNumber:function(todo) {
					return getAlreadyUsedNumber(todo);
				}
			}
		});
		
		$('#vue_vm_list div').show();
	});
}
